import * as THREE from 'three';
import { loadGltfAndCreateInstanceMeshWithMatrixWorld } from '../three-utils';

/**
 * 加载厂房-货车
 * @returns
 */
export const loadPlantTruckCar = (): Promise<THREE.InstancedMesh | null> => {
  const matrixWorldArray = [
    [
      -0.0012762820727216266, -1.1335038990625512e-10, -0.0000030421789207688404, 0,
      0.0000030421789207207967, 3.8262486031201946e-10, -0.0012762819172968025, 0,
      1.1463257327995525e-10, -0.0012762855430002236, -6.932025787291389e-10, 0, 5.759580612182617,
      -0.17318378388881683, -2.060777187347412, 1,
    ],
    [
      -0.0012762820727216266, -1.1335038990625512e-10, -0.0000030421789207688404, 0,
      0.0000030421789207207967, 3.8262486031201946e-10, -0.0012762819172968025, 0,
      1.1463257327995525e-10, -0.0012762855430002236, -6.932025787291389e-10, 0, 4.895183086395264,
      -0.17318378388881683, -1.974815011024475, 1,
    ],
    [
      -0.0012755733668035705, -1.148706810981727e-10, 0.00004262414562299427, 0,
      -0.00004262414562303891, 5.671556462864843e-10, -0.0012755733978887177, 0,
      9.69034409241036e-11, -0.0012762853564902523, -5.085224338266652e-10, 0, 5.7357025146484375,
      -0.17318378388881683, -0.9146150350570679, 1,
    ],
    [
      0.000007613665885032008, -2.2662824325469028e-10, -0.0012762627736678427, 0,
      0.001276262773667752, 4.3669958247206374e-10, 0.000007613762371492075, 0,
      5.31824684949164e-10, -0.0012762854840620503, 1.3331841119052203e-10, 0, 5.13396692276001,
      -0.17318378388881683, -0.9337177872657776, 1,
    ],
  ];
  return loadGltfAndCreateInstanceMeshWithMatrixWorld({
    modelPath: '/model/plant-truck-car/model.glb',
    matrixWorldArray,
  });
};
